<extend name="Public/base" />

<block name="body">    
    <table width="100%">
        <tr>
            <td width="50%" valign="top" > 
                <!------左边S------>
                <div class="data-table table-striped">     
                    <table class="">
                        <thead>
                            <tr>               
                                <th   width="100">订单{$order.id}详情</th>
                                <th class="" width="130"></th>
                                <th class="" width="130"></th>
                                <th class=""></th>                   
                            </tr>
                        </thead>
                        <tbody>

                            <tr>
                                <th>订单状态</th>
                                <td colspan="2">{$order.status} | {$order.status_text}</td>
                             
                                <td>
                                    <eq name="order.status" value="3000"> <a href="{:U('Order/packaction?oid='.$order['id'])}" class="confirm  btn submit-btn">打包出库操作</a></eq>
                                    <eq name="order.status" value="5000"><a href="{:U('Order/outputaction?oid='.$order['id'])}" class="confirm  btn submit-btn">确认发货操作</a></eq>
                                    <a href="{:U('Order/packprint?oid='.$order['id'])}" class=" btn" target="_blank">出库单打印</a>
                                </td>
                            </tr>
                            <tr>
                                <th>订单包裹重量</th>
                        <form action="{:U('weightmodfiyaction')}" method="post" class="form-horizonta0"> 
                            <input type="hidden" name="oid" value="{$order.id}"/> 
                            <td> 称重<input type="text" name="weight" class="text input-2x myinput" value="{$order.weight}" /> g</td>
                            <td> 体积重<input type="text" name="bulkfactor" class="text input-2x myinput" value="{$order.bulkfactor}" /> g</td>
                            <td> <eq name="order.status" value="4000"><button class="btn submit-btn ajax-post  confirm" id="submit" type="submit" target-form="form-horizonta0">修改包裹重量</button></eq></td>
                        </form>
                        </tr>
                        <tr>
                            <th>订单金额</th>
                        <form action="{:U('paymodfiyaction')}" method="post" class="form-horizontal">
                            <input type="hidden" name="oid" value="{$order.id}"/> 
                            <td> <input type="text" name="money" class="text input-2x myinput" value="{$order.money}" /> 元</td>
                            <td> <input type="text" name="remark" class="text input-2x myinput" value="修改理由" /></td>
                            <td><eq name="order.status" value="4000"><button class="btn submit-btn  ajax-post  confirm" id="submit" type="submit" target-form="form-horizontal">修改订单金额</button></eq></td>
                        </form>
                        </tr>
                        <tr>
                            <th>物流公司</th>                                
                        <form action="{:U('outputmodfiyaction')}" method="post" class="form-horizontal2">
                            <input type="hidden" name="oid" value="{$order.id}"/> 
                            <td>  <input type="text" name="expname" class="text input-2x myinput" value="{$order.expname}" /></td>
                            <td>  <input type="text" name="expnumber" class="text input-2x myinput" value="{$order.expnumber}" /></td>
                            <td> <eq name="order.status" value="6000"><button class="btn submit-btn ajax-post confirm" id="submit" type="submit" target-form="form-horizontal2">修改物流信息</button></eq></td>
                        </form>
                        </tr>
                        <tr>
                            <th>订单用户备注</th>
                            <td> {$order.remark}</td>
                            <td> </td>
                            <td> </td>
                        </tr>
                        </tbody>

                    </table>
                </div>
                <!------左边E------>
            </td>
            <td valign="top" style=" background-color: #FFFAEA"> 
                <!------右边S------>
                <div class="data-table table-striped" style=" border-left: 3px solid black">     
                    <table class="">
                        <thead>
                            <tr>               



                                <th class="" width="130">处理时间</th>
                                <th class="" >处理信息</th>
                                <th class="">操作人</th>                   
                            </tr>
                        </thead>
                        <tbody>
                        <volist name="logs" id="vo">
                            <tr>

                                <td>{$vo.createdate|time_format}</td>
                                <td> {$vo.remark}</td>
                                <td> {$vo.username}</td>
                            </tr>
                        </volist>

                        </tbody>
                    </table>
                </div>
                <!------右边E------>
            </td>
        </tr>
    </table>


    <style>

        .img2wei{margin: 2px;}
        .table2{border: 1px solid #000;}
        .table2 tr th{
            background-color: #F5F5F5;
            font-size: 9px;
            font-weight: normal;
            border: 1px solid #000;
            padding-left: 5px;
        }
        .table2 tr td{
            border: 1px solid #000;
            padding-left: 5px;
            font-weight: bold;
        }   
        .toolbarpr{
            padding:20px;
            border-bottom: 2px solid #006dcc;
            background-color: #091620;
            color: #fff;
        }

    </style>



    <volist name='data' id='vodata'>
        <div class="printpage" style='min-height: 27.5cm; max-height: 27.5cm; margin: 0px;'>
            <div class="row" style=" background: #000;color: #fff; height: 30px;line-height: 30px;text-align: center;">
                <div class="col-xs-5"> Order NO.：{$vodata.orderdata.oid}  </div>          
            </div>

            <div >
                <table width="100%" border="0" class="table2 ">
                    <tr>
                        <th rowspan="5"  bgcolor="#F5F5F5" scope="row" width="20%" style=" text-align:center;"><img src="__STATIC__/phpqrcode/QRcode.php?id={$vodata.orderdata.oid}&type=order&size=4" ></th>
                        <th colspan="4">SHIPPER</th>
                    </tr>
                    <tr>
                        <th width="20%">NAME OF SENDER</th>
                        <td width="21%">{$vodata.warehousedata.person}</td>
                        <th width="20%">TELEPHONE NO.<br/><small>(VERY IMPORTANT)</small></th>
                        <td width="27%">{$vodata.warehousedata.phone}</td>
                    </tr>
                    <tr>
                        <th colspan="4">COMPANY NAME AND ADDRESS(Inculde Postal Code)</th>
                    </tr>
                    <tr>
                        <td colspan="4">                                  
                            {$vodata.warehousedata.location}<br/>
                            {$vodata.warehousedata.city}, {$vodata.warehousedata.province},{$vodata.warehousedata.country},{$vodata.warehousedata.zipcode}<br/>
                        </td>
                    </tr>
                    <tr>
                        <th>POSTAL CODE</th>
                        <td>{$vodata.warehousedata.zipcode}</td>
                        <th>COUNTRY</th>
                        <td>{$vodata.warehousedata.country}</td>
                    </tr>
                </table> 
                <table width="100%" border="0" class="table2">
                    <tr>
                        <th width="5%" rowspan="4" scope="row">RECEIVER</th>
                        <th width="20%">NAME OF CONTACT PERSON</th>
                        <td width="21%">{$vodata.orderdata.name}</td>
                        <th width="27%">TELEPHONE NO.<br/><small>(VERY IMPORTANT)</samll></th>
                        <td width="27%">{$vodata.orderdata.phone}</td>
                    </tr>
                    <tr>
                        <th colspan="4">COMPANY NAME AND ADDRESS(Inculde Postal/Zip Code)</th>
                    </tr>
                    <tr>
                        <td colspan="4">
                    <notempty name="orderdata.street">{$vodata.orderdata.street}<br/></notempty>
                    {$vodata.orderdata.address} ,
                    {$vodata.orderdata.city}, {$vodata.orderdata.province}, {$vodata.orderdata.country},{$vodata.orderdata.zipcode}<br/>
                    </td>
                    </tr>
                    <tr>
                        <th>POSTAL CODE</th>
                        <td>{$vodata.orderdata.zipcode}</td>
                        <th>COUNTRY</th>
                        <td>{$vodata.orderdata.country}</td>
                    </tr>
                </table>
            </div>
            <br/>
            <hr/>
            <div class="row">
                <div class="col-xs-6">出库单/{$vodata.orderdata.eid|get_expline_name} /{$vodata.orderdata.wid|get_warehouse_name}</div>

            </div>
            <br/>
            <div class="row">
                <div class="col-xs-6">
                    <table width="100%" border="0" class="table2 table-condensed ">
                        <tr >
                            <th scope="col"  width="20%">需要出库的</th>
                            <th scope="col">包裹编码/位置/包裹描述</th>
                        </tr>

                        <volist name="vodata.packagelist" id="vo"> 
                            <tr>   
                                <td   style=" text-align:center;"> <img   src="__STATIC__/phpqrcode/QRcode.php?id={$vo.id}&type=package&size=3"> </td>
                                <td> 

                                    {$vo.id}/{$vo.location}/{$vo.name}/{$vo.remark} <BR/>
                                    <span style="color: red;border-bottom: 1px solid #000"><gt name="vo.bulkfactor" value="$vo.weight">{$vo.bulkfactor}<else/>{$vo.weight}</gt>g</span>

                                </td>  
                            </tr>
                        </volist>

                    </table>

                </div>

            </div>
        </div>

    </volist>


</block>


<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

    <script type="text/javascript">

//导航高亮
        highlight_subnav('{:U('Order/index')}');
    </script>
</block>